﻿@{
    Layout = "~/Views/Shared/Home/_Layout.cshtml";
}

@{
    ViewBag.Title = "BabyToys-Home";
}
@model IEnumerable<BabyToys.Models.SanPham>
<div class="content">
    <div class="content-left">
        @{Html.RenderAction("ModuleDanhMuc", "Home");}
        <br />
        @RenderPage("~/Views/Shared/Home/_ModuleSanPhamNoiBat.cshtml")
    </div>
    <div class="content-right">
        @RenderPage("~/Views/Shared/Home/_ModuleSlider.cshtml")
        <div class="list"></div>
        <h1>Sản phẩm mới</h1>
        
        <div class="endtitle"></div>
        @foreach (var sanpham in @Model)
        {
            <div class="box-product">
                <div class="image-product">
                    <img src="~/Content/Images/1355137929_75101-160x160.jpg" />
                </div>
                <div class="name">
                    @{string title=BabyToys.Utilities.EditString.BoDauTrenChuoi(sanpham.TenSP);}
                    @Html.ActionLink(sanpham.TenSP,"ChiTiet","SanPham",new{id=sanpham.IdSanPham,slug=title},null)
                </div>
                <div class="price">
                    @if (sanpham.GiaKM > 0)
                    {
                        <span class="price-old">@sanpham.Giaban</span>
                        <span class="price-new">@sanpham.GiaKM</span>
                    }
                    else
                    {
                        <span class="price-new">@sanpham.Giaban</span>
                    }
                </div>
                <div class="addcart"><a class="purple button dlLight" href="#">Thêm giỏ hàng</a></div>
            </div>
        }
    </div>
    <div class="clear"></div>
</div>
